$(function() {

});

function goto(module) {
    alert(module);
    if (module == "测试页面") {
        url="/activitiDemo/test/";
        ico="icon-cog";
    }
    else if (module == "首页") {
        url="/snyzf/dashboard/";
    }
    else if (module == "基础数据") {
        url="/snyzf/baseData/";
        ico="icon-databases";
    }
    else if (module == "投诉举报") {
        url="/snyzf/complaint/";
        ico="icon-report";
    }
    else if (module == "执法检查") {
        url="/snyzf/dailyCheck/";
        ico="icon-tick";
    }
    else if (module == "执法抽检") {
        url="/snyzf/qualityCheck/";
        ico="icon-error";
    }
    else if (module == "督办协办") {
        url="/snyzf/caseManagement/";
        ico="icon-folder";
    }
    else if (module == "监管对象") {
        url="/snyzf/superviseObject/";
        ico="icon-user_suit_black";
    }
    else if (module == "处罚案件") {
        url="/snyzf/punishCase/";
        ico="icon-folder";
    }
    else if (module == "统计报表") {
        url="/snyzf/statistics/";
        ico="icon-chart_bar";
    }
    else if (module.split(",")[0] == "交流大厅") {
        url="/groupChat/index.jsp?nickName="+module.split(",")[1] ;
        ico="icon-group";
    }else{
        return;
    }
    // var tab = $('#tt').tabs('getTab', module);

    if (true) {
        $('#tt').tabs('add', {
            title: module,
            iconCls:ico,
            content: ' <iframe frameborder="0"  src="' + url + '" style="width:100%;height:99%;margin:0 0 0 0;padding:0 0 0 0"></iframe>',
            closable: true,
            fit:true,
        });
    }
    else {
        $('#tt').tabs('select', module);
    }
}